﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CH.Easy.OpenLogin
{
    public abstract class AbstractOpenAPI
    {
        protected AbstractOauthV2 oAuth;
        public AbstractOpenAPI(AbstractOauthV2 oAuth) 
        {
            this.oAuth = oAuth;
        }
        /// <summary>
        /// 授权第一步
        /// </summary>
        /// <returns></returns>
        public abstract string GetAuthorizeUrl();
        /// <summary>
        /// 授权第二步
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public abstract AccessTokenDTO GetAccessToken(string code);
        /// <summary>
        /// 授权第三步
        /// </summary>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public abstract CallBackDTO GetOpenID(string accessToken);

        public abstract UserDTO GetUserInfo(string format);

        public abstract ResultDTO AddWeibo(string format, string content, string clientip, string jing, string wei, string syncflag);

        public abstract ResultDTO AddPicWeiBo(string format, string content, string clientip, string jing, string wei, string picUrl, string syncflag);

    }
}
